console.log(1)
setTimeout(() => {
    console.log(2)
}, 0)
const p1 = new Promise((resolve) => {
    console.log(3)
    resolve()
})
async function app() {
    console.log(7)
    await 1
    console.log(8)
}
p1.then(() => {
    console.log(4)
    app()
}).then(() => {
    console.log(5)
})
// 1 3 4 7 8 5 2
// 2
// 4 8 5